﻿<Page x:Class="GKS.XAML.AddEditCategoryPage" 
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:local="clr-namespace:GKS.XAML"
      xmlns:localUC="clr-namespace:GKS.XAML.UserControls"
      xmlns:vm="clr-namespace:GKS.Model.ViewModels;assembly=GKS.Model"
      mc:Ignorable="d" 
      d:DesignHeight="326" d:DesignWidth="549" 
	Title="AddEditCategoryPage">
    
    <Page.DataContext>
        <vm:AddEditCategoryModel></vm:AddEditCategoryModel>
    </Page.DataContext>

    <Page.Resources>
        <vm:EnumMatchToBooleanConverter x:Key="enumConverter" />
    </Page.Resources>

    <Grid Height="329" Width="545">
        <Grid.RowDefinitions>
            <RowDefinition Height="225*" />
            <RowDefinition Height="104*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="282*" />
            <ColumnDefinition Width="263*" />
        </Grid.ColumnDefinitions>
        <Label Content="Category Name:" Height="28" HorizontalAlignment="Center" Margin="90,64,94,133" Name="label1" VerticalAlignment="Center" Width="98" />
        <TextBox Text="{Binding Path=CategoryName, Mode=TwoWay}" Height="23" HorizontalAlignment="Center" Margin="190,66,93,136" Name="textCategoryName" VerticalAlignment="Center" Width="262" Grid.ColumnSpan="2" />

        <Label Content="Type:" Height="28" HorizontalAlignment="Center" Margin="147,96,97,101" Name="label2" VerticalAlignment="Center" />


        <RadioButton GroupName="Revenue" IsChecked="{Binding Path=CurrentCategoryOption, Mode=TwoWay, Converter={StaticResource enumConverter}, ConverterParameter=Revenue}" Content="Revenue" Height="16" HorizontalAlignment="Center" Margin="190,100,15,108" x:Name="Revenue" VerticalAlignment="Center" Width="77" />
        <RadioButton GroupName="Capital" IsChecked="{Binding Path=CurrentCategoryOption, Mode=TwoWay, Converter={StaticResource enumConverter}, ConverterParameter=Capital}" Content="Capital" Height="16" HorizontalAlignment="Center" Margin="190,122,26,87" x:Name="Capital" VerticalAlignment="Center" Width="66" />
        <Label Content="Status:" Height="27" HorizontalAlignment="Center" Margin="140,178,96,20" Name="label3" VerticalAlignment="Center" Width="46" />
        <RadioButton GroupName="CategoryStatus" Content="Active" Height="16" HorizontalAlignment="Center" Margin="190,184,26,25" Name="radioButtonActive" VerticalAlignment="Center" IsChecked="True" Width="66" />
        <RadioButton GroupName="CategoryStatus" Content="Inactive" Height="16" HorizontalAlignment="Center" Margin="190,205,26,4" Name="radioButtonInactive" VerticalAlignment="Center" Width="66" />

        <Button Content="Save" Height="23" HorizontalAlignment="Center" Margin="11,9,177,72" Name="buttonSave" VerticalAlignment="Center" Width="75" Command="{Binding Path=SaveButtonClicked}" Grid.Column="1" Grid.Row="1" />
        <Button Content="Close" Height="23" HorizontalAlignment="Center" Margin="95,9,93,72" Name="buttonClose" VerticalAlignment="Center" Width="75" Command="{Binding Path=CancelButtonClicked}" Grid.Column="1" Grid.Row="1" />
        
    </Grid>
</Page>
